﻿<%@ Page Title="" Language="VB" MasterPageFile="~/Articles.master" AutoEventWireup="false" CodeFile="ArticleCommentsView.aspx.vb" Inherits="ArticleCommentsView" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<fieldset>
<legend>View Comments for Articles</legend>
    <asp:GridView ID="DGComments" runat="server" AutoGenerateColumns="False" 
        DataSourceID="DSArtComments">
        <Columns>
            <asp:BoundField DataField="Author" HeaderText="Author" 
                SortExpression="Author" />
            <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" />
            <asp:BoundField DataField="Comments" HeaderText="Comments" 
                SortExpression="Comments" />
            <asp:BoundField DataField="SubmittedDate" HeaderText="SubmittedDate" 
                SortExpression="SubmittedDate" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="DSArtComments" runat="server" 
        ConnectionString="<%$ ConnectionStrings:myFirstDatabase %>" 
        ProviderName="<%$ ConnectionStrings:myFirstDatabase.ProviderName %>" 
        SelectCommand="SELECT * FROM [QArticleCommnts] WHERE ([Article_fkid] = ?)">
        <SelectParameters>
            <asp:QueryStringParameter Name="Article_fkid" QueryStringField="ID" 
                Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
</fieldset>
</asp:Content>

